import java.util.Arrays;
import java.util.Scanner;
public class javaTest {




    //比特考试第1题(方法1)
    //题解思路：(字符串转字符数组+哈希思想)将该字符串转化为字符数组，再创建一个临时数组记录字符数组中出现的每个字符(过滤掉重复出现的字符)
    //依次打印出每次第一次被记录的字符
    public static void main5(String[] args) {
        Scanner scanner=new Scanner(System.in);
        while(scanner.hasNextLine()){
            String str=scanner.nextLine();
            char[]strChars=str.toCharArray();
            char[]check=new char[128];
            for (int i = 0; i < strChars.length; i++) {
                if(check[strChars[i]]==0){
                   check[strChars[i]]=strChars[i];
                    System.out.print(check[strChars[i]]);
                    check[strChars[i]]++;
                }
            }
            System.out.println();
            
        }
    }
    
    //比特考试第1题(方法2)
    //(字符串的字符分割及字符拼接+哈希思想)
    public static String work(String str){
        int[]arrays=new int[127];
        StringBuilder stringBuilder=new StringBuilder();
        for (int i = 0; i < str.length(); i++) {
            char ch=str.charAt(i);
            if(arrays[ch]==0){
                //把字符串中每一个新出现的字符新增到空字符串stringBuilder上
                stringBuilder.append(ch);
                arrays[ch]=1;
            }
        }
        return stringBuilder.toString();//通过调用toString方法把StringBuilder字符串转型为普通字符串
    }

    public static void main2(String[] args) {
        Scanner scanner=new Scanner(System.in);
        while(scanner.hasNextLine()){
            String str=scanner.nextLine();
            String string=work(str);//对传入的字符串进行操作
            System.out.println(string);
        }
    }





    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextInt()) {
            String str=scanner.nextLine();
            StringBuilder retur=new StringBuilder();
            System.out.println(54654);
            for (int i = 0; i < str.length(); i++) {
                char temp=str.charAt(i);
                System.out.println(11111);
                if(!(retur.toString().contains(temp+""))){
                    System.out.println(44444);
                    retur.append(temp);
                }

            }
            System.out.println(56565);
            System.out.println(retur);
        }

    }
}
